S'inscrire - FAQ - Membres - Marquer les forums comme lus -

Précédent   Asslema Tunisie > Technologie > Programmation & web

Programmation & web Tout vos problèmes en relation avec le HTML, PHP, JSP, JAVA, JAVASCRIPT, WINDEV, AJAX, VB...

Réponse
 
LinkBack Outils de la discussion Modes d'affichage
  #1 (permalink)  
Vieux 30/05/2007, 15h35
Avatar de sofien007
Forum Master
 
Date d'inscription: novembre 2005
Localisation: Tunis
Âge: 27
Sexe: Homme
Messages: 2 076
sofien007 sera brave homme/femme sofien007 sera brave homme/femme sofien007 sera brave homme/femme sofien007 sera brave homme/femme sofien007 sera brave homme/femme sofien007 sera brave homme/femme
How to retrieve project absolute path in Eclipse?

hi all,

Well, the problem is that I need to retrieve the project path dynamically in a JAVA class in Eclipse.

Thanks in advance !
__________________
Réponse avec citation
  #2 (permalink)  
Vieux 30/05/2007, 15h52
Avatar de Ram-Z
sick with it
 
Date d'inscription: janvier 2007
Localisation: Frankfurt am Main
Sexe: Homme
Messages: 3 323
Ram-Z a une réputation au-delà de tout renom Ram-Z a une réputation au-delà de tout renom Ram-Z a une réputation au-delà de tout renom Ram-Z a une réputation au-delà de tout renom Ram-Z a une réputation au-delà de tout renom Ram-Z a une réputation au-delà de tout renom Ram-Z a une réputation au-delà de tout renom Ram-Z a une réputation au-delà de tout renom Ram-Z a une réputation au-delà de tout renom Ram-Z a une réputation au-delà de tout renom Ram-Z a une réputation au-delà de tout renom
AW: How to retrieve project absolute path in Eclipse?

do you mean the classpath in Java or the Project location on your disk?
if you mean the classpath: String path = System.getProperty("java.class.path");
if you mean the location you can get it somehow if you search in your workspace!
Réponse avec citation
  #3 (permalink)  
Vieux 30/05/2007, 16h22
Avatar de sofien007
Forum Master
 
Date d'inscription: novembre 2005
Localisation: Tunis
Âge: 27
Sexe: Homme
Messages: 2 076
sofien007 sera brave homme/femme sofien007 sera brave homme/femme sofien007 sera brave homme/femme sofien007 sera brave homme/femme sofien007 sera brave homme/femme sofien007 sera brave homme/femme
Re : How to retrieve project absolute path in Eclipse?

I mean the location on my disk. Well, suppose my projects path on disk is :

E:\Projects\com.company.RCPExample

What i get by retrieving workspace and then look for my project by its name is "/com.company.RCPExample" or i need "E:\Projects\com.company.RCPExample", did u get what i wanna say ?well, if not i'm here
__________________
Réponse avec citation
  #4 (permalink)  
Vieux 30/05/2007, 17h23
Avatar de Ram-Z
sick with it
 
Date d'inscription: janvier 2007
Localisation: Frankfurt am Main
Sexe: Homme
Messages: 3 323
Ram-Z a une réputation au-delà de tout renom Ram-Z a une réputation au-delà de tout renom Ram-Z a une réputation au-delà de tout renom Ram-Z a une réputation au-delà de tout renom Ram-Z a une réputation au-delà de tout renom Ram-Z a une réputation au-delà de tout renom Ram-Z a une réputation au-delà de tout renom Ram-Z a une réputation au-delà de tout renom Ram-Z a une réputation au-delà de tout renom Ram-Z a une réputation au-delà de tout renom Ram-Z a une réputation au-delà de tout renom
AW: How to retrieve project absolute path in Eclipse?

I suggest File f = new File( "E:/Projects/com.company.RCPExample" ); and give the whole path, but the problem is that it's not dynamic, if the file is created during the runtime then you have a problem.
tell more about your aim.
Réponse avec citation
Réponse

Outils de la discussion
Modes d'affichage

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

BB code is oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui



Fuseau horaire GMT +1. Il est actuellement 03h05.