Problem with environment variable & compiling
G'day all,
I'm totally confused :(
I've set my environment detail but when I use javac the command window just does nothing. The cursor (or flashing thingo) drops to the line below and just hangs there. If i manually type in the entire path javac works fine.
Image of my environment variable window is here:
http://img130.imageshack.us/img130/5120/environvariables.jpg
Using Windows 7, JDK 1.6.0_18 and latest version of Eclipse is installed.
Second issue:
I wrote a program using Eclipse. It all went into a package named "openagil". 3 classes in total. Class "A", "B", "C". A uses both B and C. It creates an instance of B and C. Included in each is package openagil; at the very top.
Running in eclipse it works fine. However, how do I compile this using javac and then in turn run it? The .java files are located within a workbench folder (java) and then in the package directory (openagil). These are contained on the D drive so "d:\java\openagil" - No class variables are set as I am unsure how this is done (despite reading a few guides).
I can do javac d:\...*.java and it'll compile all of them fine but I am then unsure how to run it. I think what I do is do java openagil.classA but this pulls up errors - an "exception in thread' error followed by a "noclassdeffound: openagil/classA" then a whole bunch of URL/Access Controller stuff.
I understand programming fine, but configuring this is a bitch. My Java book doesn't cover installation nor does it cover packages and the
LordMidol wrote:
Second issue:
I wrote a program using Eclipse. It all went into a package named "openagil". 3 classes in total. Class "A", "B", "C". A uses both B and C. It creates an instance of B and C. Included in each is package openagil; at the very top.
Running in eclipse it works fine. However, how do I compile this using javac and then in turn run it? The .java files are located within a workbench folder (java) and then in the package directory (openagil). These are contained on the D drive so "d:\java\openagil" - No class variables are set as I am unsure how this is done (despite reading a few guides).
I can do javac d:\...*.java and it'll compile all of them fine but I am then unsure how to run it. I think what I do is do java openagil.classA but this pulls up errors - an "exception in thread' error followed by a "noclassdeffound: openagil/classA" then a whole bunch of URL/Access Controller stuff.You need to us the -classpath (or -cp) command line option to specify where java looks for your .class files. I think it would be java -cp d:\java openagil.classAFYI class naming convention is to start with a capital letter - YourMainClass for example. It may help to go here [http://java.sun.com/javase/6/docs/technotes/tools/index.html] and go to General Information, then click on How Classes Are Found.
Similar Messages
-
Problem with environment variables
JAVA_HOME = C:\JBuilder9\jdk1.4
Path = C:\oracle\product\10.1.0\Db_1\bin;C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin;C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin\client;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;.;C:\oracle1\product\10.1.0\Db_3\jdbc\lib\classes12.zip
When I run foo.java I get this error, which i believe is because of some kind
of problem with environment variables.
Exception in thread "main" java.lang.NoClassDefFoundError: OraThinI eliminated this path
C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin
just to check whether two paths of jdk bin folder is causing problem but I see no change.
Please helpI had solved it myself
I am a genious :P
Just do this
JAVA_HOME = C:\JBuilder9\jdk1.4
CLASSPATH = C:\oracle\product\10.1.0\Db_1\jdbc\lib\classes12.zip;.;%JAVA_HOME%\bin
PATH= C:\oracle\product\10.1.0\Db_1\bin;C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin;C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin\client;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;.;C:\oracle1\product\10.1.0\Db_3\jdbc\lib\classes12.zip;%JAVA_HOME%\bin -
Problem with ENVIRONMENT VARIABLES in MS-DOS
I have just installed JDK & J2EESDK under the directory C:\Program Files.
I set my JAVA_HOME to C:\Program Files\jdkblahblah\bin
and J2EE_HOME to C:\Program Files\j2eesdkblahblah\bin
and CLASSPATH to %J2EE_HOME%\lib\j2ee.jar
As you may have noticed there is a space in the directory "Program Files" and this has been giving me a lotta problems. When i try to run any batch files it doesn't recognise the classpath...Same thing happens when i try to run javac with the -classpath option.
Even when i use full path names instead of env.variables it still has problems as it is assuming the latter part after the space(Files\j2ee..) and the one before the space(C:\Program) as two different paths....
How do i fix this? I have a work-around but, I would like to know how to fix this thing...I guess that surrounding the path with quotes might help. You have windoze on your 'puter, haven't you. In case of Win2K, right click on "my computer", select "properties", select "special", and then "environment variables". There you may edit the PATH. I guess editing the classpath is also a must.
Or, alternatively, uninstall java, and reinstall it in the root directory, without having white spaces in the path. Makes your life much easier... -
Problem with environment variable settings
I am using J2SDK1.4.1
I have set the classpath variables and path variables properly.
When I go to commandline c:\> and type the command "javac" I get a message as follows---
Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
has value '1.4', but '1.3' is required.
Error: could not find java.dll
Error: could not find Java 2 Runtime Environment.
If I change directory to c:\j2sdk1.4.1\bin> and type javac c:\dir_name\filename.java then the file compiles but when I try to run the java file I get an error message "Exception in thread main no ClassDef Found".
How do I compile and run my java files.
Can any body help me out.Your registry has some information in it that is in conflict with the 1.4.1 installation. Search the forums, there are some strings that address this problem of version conflicts.
-
HI,
I am facing problem with formula variable with replacement path. my requirement is system date - posting date.
here i created 2 formula variable one is system date. second formula vaiable with replacement path is posting date. second formula vaiable not populating data. please help on that.
regards,
krisHi,
here is some idea.. here i have taken expample dates 1)notification creation date and 2) notification completion.
1st:in the query designer at key figure coloumn create
one local formula.in that local formula create formula
variable with replacement path.in that take reference character
notification completion.in the next tab take replace ment
as key.in the last tab select "date".
2nd: do the same thing for the notification creation date.
3 rd : create 3 rd local formula and do the substraction
for the first 2 local formulas.
4th:create codition on the difference which u have find with
on that condition u can create one user entry varibale.
5th:while u defining the query put these 2 dates,i,e
notification completion, notification creation date in the character block.
If not system will ignore the formula variable which u created in
above steps.
Hope this wil help u.
regards....KP -
I am new to Java Programming.
I have a line of code that works and does what is supposed to.
faceData.getProfile("Lisa").removeFriend("Curtis");
If I assign the strings to variables such as-
String name = "Lisa";
String fName = "Curtis";
and then plug those into the same line of code, it does not work
faceData.getProfile(name).removeFriend(fName);
What could be causing the problem?
I even added some lines to print out what is stored in the variables to verify that they are what they should be, but for some reason the variables do not work while putting the strings in quotes does. Any ideas?I guarantee that something about your assertions are incorrect. Those variables are either not equal to the values you claim, or something else is going on. But it's not a problem with string variables versus string constants.
Edit: My best guess in lack of a real example from you, is that the strings in question have non-printable characters in them, such as trailing spaces or line feeds. -
TPC 2012 - Problems with shared variable
Hi,
I tried to program simmilar thing to this one http://zone.ni.com/devzone/cda/tut/p/id/5548 on TPC 2012. But it doesn't work.I can see that both programs on my laptop and TPC are working(I've added an additional counter with display), but I cannot see any effect on TPC when I change the value of shared variable on my laptop. I use LabView 8.6 with Touch Panel Module. My question is what are the exact steps to run such application on TPC2012? Are they the same as for TPC 2006?
I've noticed following issues:
1.I cannot deploy the program from Project Manager(there is an information that maybe TPC Service is not started. - I've found such information about TPC Service http://digital.ni.com/public.nsf/allkb/DE177828D27A14A48625734E00768B66 but in fact I cannot find Start » All Programs»National Instruments » NI TPC Service » NI TPC Service Manager 1.0 Does it mean, that the TPC Service is not installed and the programm with shared varibles won't be working or can I start it somehow in another way? Do I need to have TPC service installed on TPC2012?
Until now, I've built the project and sent it through FTP to TPC(the folder was /TEMP) and then started it.
2.Ping works OK
Thank you in advance for any hints how to solve this problem.
MartinWell no problem, but I'm frustrated with this issue... I've tested many things and nothing. Just to help someone else as I in the future, these are my sources:
http://forums.ni.com/t5/LabVIEW/TPC-2012-Problems-with-shared-variable/m-p/1009631/highlight/false#M...
http://digital.ni.com/public.nsf/allkb/28536DE7E2D9E98B8625770B00738920?OpenDocument
http://zone.ni.com/reference/en-XX/help/372507B-01/lvtpcgsm/tpc_install_sharvar/
http://zone.ni.com/reference/en-XX/help/372507C-01/lvtpcgsm/tpc_install_sharvar/
http://digital.ni.com/public.nsf/allkb/23532363F4905EC28625727A00730B80?OpenDocument
http://forums.ni.com/t5/FieldPoint-Family/TPC-2006-Not-Listed-in-Targets-and-Devices/td-p/566325
http://forums.ni.com/t5/LabVIEW/MAX-can-t-detect-TPC-2106T/td-p/831524
http://zone.ni.com/devzone/cda/tut/p/id/5868
http://digital.ni.com/public.nsf/websearch/28B748B9697B79E18625725A00009066?OpenDocument
http://digital.ni.com/public.nsf/websearch/D1726990DCEB82E4862570F20069C57D?OpenDocument
http://digital.ni.com/public.nsf/allkb/3B469103BBDD4CE48625726000665B36
I hope find some hint..
Fabian León
Certified LabVIEW Associate Developer -
Help reqd on Trace with environment variables
Hi,
Please let me know the procedure to set trace with environment variables.
Kindly forward any related links to this.
regards,
Naveen.AHi Naveen,
Go through this help documents. Hope it helps.
http://help.sap.com/saphelp_nw04/helpdata/en/5e/4dfca06fc1ea4ea31c0c522c62cb1a/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/ef/8eb899cf32416eaa452329c64acb5f/frameset.htm
Cheers,
Aravindhan -
Problems with /tmp variable
Hi,
I'm writing a shell script and I seem to be having problems with a variable that is creates a directory in the /tmp directory. Essentially, there are several points where various parts of the script call out information that gets exported to that directory. My script is failing upon creation of this directory, is there any specific permissions on the /tmp directory in mac that would need to be set before something like this occurred?
Thanks!My script is failing upon creation of this directory
Maybe you could post your code, that way we can see how you're trying to create the directory and may be able to spot the problem. As it is we're working blind, and that's not easy. -
I have been working for months with java and all of a sudden today when i was compiling a program i got an error stating that the variable out can't be.
To confirm my suspicion that somrhtings wrong i wrote this program and tested it
class Example
public static void main(String args[])
System.out.println("This is my first program");
}And i get this error when i compile
Cannot find symbol
variable out
All this time the JRE was ok and now this unexpected problem.Whats happening?It works if I import java.lang.System and run the program.I have been working for months and this is the first time.Is it because of some virus or something.Should i reinstall the JDK.I thought of asking at the forum before i could try reinstalling and checking it out again... Where do you get this error? Eclipse has a bug
which is related to this. Sometimes I have to remove
the JRE from installed JREs in Eclipse, and then just
add it again, and then everything works.
KajI don't use an IDE.I use the command prompt.I get the error at the command prompt.
My computer has two OS both XP.I jdk 1.5 installed on both these OS.I run the jdk on the first jdk which is on the active partition and when it stopped working on this one i immediately restarted the pc and started the other xp where i have installed jdk 1.5 too.But even there it's the same case.
But if any environment variables or registry contents have changed thats local to the first xp but how will it effect the second xp.Is it because of any virus
Please note i will be going out and will get back to the thread in around 2 hours.Thanks a lot of the response. -
Problem with application-variables - CFLOCK?
Hi,
i have a problem with my application. It is a multi-user
application with 100 parallel-users and CFMX 7.
The problem wich occures is with application variables. These
are mainly structs wich get filled onApplicationStart(). The
problem is, that the variables suddenly disappear, they are empty.
I have read about CFLock and found out, that it is necesseary
to use cflock. And i found out, that onApplicationStart does
correct locking automatically. That is where i do not understand
the problem. The variables get intialized correctly and in further
they only get read-access. Why can they be corrupted?
My other question about that is, wheather i need cflock for
all Read-Access to Application and Session-Variables, even if there
happens no writing to the variables?
Best Regards,
Andreas> ?The element of position 2, of dimension 2, of an array
object used as part of
> an expression, cannot be found.?
> The array is in this case the struct.
Well, OK, that could be a problem. Arrays are not structs:
they are two
different things, are not interchangeable, and have
completely different
sets of functions to utilise them. You cannot treat a struct
as an array.
If CF is claiming your "struct" is an array, then it actually
*is* an
array, not a struct.
What's the line of code which is generating that error?
I suppose one could get this error if you have an array of
structs thus:
myArray
.key1
myArray.key2
(etc)
and you're trying to reference it with a numeric key rather
than by key
name, eg:
myArray
[n]
When n is an integer value, rather than a string (which
corresponds to the
name of the key).
> > Have you trapped the error, done a <cfdump>
of the application scope and
> > checked to see if it's the whole lot going awry, or
just some values?
> I have not used cfdump for it, because the server had to
be immediately
> restarted for our customers. But i think, that it is
not completely empty,
> because the index runs to pos2 of dimenstion2.
So does this not happen in your dev / testing environment?
> Will
> onApplicationStart() be called before? Or only if
onRequestStart() returns true?
I would ***-u-me that the application one would be called
before the
request one. It's pretty easy for you to test this though, I
should think?
(Sorry: for reasons beyond the scope of this conversation,
we're still
forced to use Application.cfm in our software, so I've only a
passing
knowledge of how Application.cfc works).
> Here is the code from onRequestStart()
> <cffunction name="onRequestStart"
returntype="boolean">
> <cfargument name="Requestedpage" required="yes" />
> <cfscript>
> var lFile = "/cargorent/Login.cfm";
> var iPosn = ListFindNoCase( lFile,
Arguments.Requestedpage );
> if( iPosn gt 0 )
> return true;
>
> if( NOT IsDefined( "session.user.Loginname" ) or
session.user.Loginname eq
> "" )
> {
> WriteOutput( "<p><p> The current user is no
longer valid, please log in
> again.</p></p>" & chr(10) & chr(13)
> WriteOutput( "<script
language=""javascript"">parent.location = ""
http://"
> & CGI.HTTP_HOST &
"/Login/Login.cfm"";</script>" );
> return false;
> }
>
> return true;
> </cfscript>
> </cffunction>
One thing I will say here is that I really think you should
be separating
your processing from your display. A function should do
processing. it
should pass that processing back to a CFM template which
should handle
whatever needs to be displayed on the browser. Although
that's nowt to do
with your current issue.
Adam -
BI 7 Upgrade - Problem with Authorisation Variable on Compounded Char
Dear All,
We have just upgraded our DEV environment from 3.5 to BI7 and have encountered a weird problem with 1 of our authorization variables.
Our authorization check variable checks the values from a table that the users are allowed to use (which includes the selection screen). There are 2 variables 1 for the uncompounded char and 1 for the compounded char, the uncompounded variable is working just fine but not the other. When the user tries to pick a value, they are presented with not just their restricted list but ALL the values.
Can anyone explain this? Has BI 7 changes the way authorizations work with Compounded Characteristics ?
Before anyone asks, these variables work just fine on 3.5 and are working just fine in our QA and PRD environments.
Help required urgently.
Thanks
CraigHi,
Yes authorisations in BI 7.0 are a bit different from the ones in BW 3.5. Here is the link which will help you know every thing in BI 7.0
bw 7.0
Regards,
Habeeb
Assign points if helpful. -
Problem with passing variable to restful uri's.
I have a restful URI in the format http://localhost/functionname/{itemID}. I use this URI to retrieve JSON formatted information. Through Flash Builder 4 data services I create an operation that makes use of this URI and I also hame itemID a URL parameter. The problem is that whenever I call this function from my program Flex uses the following URI instead " http://localhost/functionname/%7BitemID%7C" in other words it doesnt replace the "{itemID}" with my variable. I am using SDK 3.4 to compile. Is this a known bug and if yes how can I circumvent it? Please notice that the project needs to compile using SDK 3.4 no matter what. Thank you for reading.
Depending on how you set it up, it isn't clear that the compiler will see
as a binding expression. What does your code look like that sets
it up? -
Does "Allow log on locally" work with environment variables?
This is merely out of curiosity and just because I'm doing some conceptual gambling.
I'd like to create a GPO having the Allow log on locally set to something like the following list:
%OWNER%
BUILTIN\Administrators
The concept behind this is to prepare the system during OS installation with a value to the OWNER environment variable to allow only the specified user account (apart from the Administrators group, of course) to log on to the system without A) having to
configure this setting locally on the client and B) having a great range of different GPOs to handle all the user/computer combinations.
My questions are:
Does this work at all?
If it works, what do I need to provide as a value?
I've already tried to set <user name>, <domain name>\<user name> and
<user name>@<FQDN> but none of those seem to work.Hi,
Glad to see your problem resolved. Hope your experience could helps other who had same cofusion.
Roger Lu
TechNet Community Support -
Problem with hierarchy variable while displaying query in Portal
Hi,
I came up with an problem with a query in the portal. The problem is :
I have one query which is displayed in the portal. The Query has hierarchial selection criteria. I am executing the same query using analyzer. Its taking the variable from the selection and displaying it on the analyzer. I have used the option to " display the query on web " from the BEX query designer. From there its opening and displaying the results with the given selection criteria.
Where as when i open the query seperately in portal, its not displaying the results.
I came to know from one of my colleague that the porblem is with the Web item and the hierarchial variable declared in WAD was different from the variable declared in the BEX Query designer.
I never Worked with WAD. I tried finding out the variable definition. But i was unable to find out where the Hierarchial variable was defined.
Please help me out regarding the same.The problem is sovled.
Poornima.
Maybe you are looking for
-
I install windows 8 in my macbook pro, the problem is it cannot detect wifi connection and bluetooth, because when i click the wireless in settings there are no choices... but when i use the mac os, everything is fine, the wifi, the bluetooth everyth
-
Transferin Huge data via Java sockets! Problematic!
Hello! I tried to write a server app in Java to get huge data which contains a meta data XML format about file information and then binary data of file... I get data from socket with DataInputStream and then I read like this: ByteArrayOutputStream ou
-
When Nokia PC suite is released to Linux-family op...
People are started to replace old Windows XP systems to new operating system (or planned to install near future) because everyone is telling that Windows Vista didn't work well even on new preinstalled system. Most of people I know are replaced their
-
HT3529 how do I print my text messages?
can someone help me learn to print out my text messages?
-
Error "could not connect....0xE8000001 UGH!
Hey gang. Please help. Advanced user here, been reading posts and all Mac Docs for a week straight now. Here is my specific issue I can reinstall iTunes and connect to iPod touch just fine. I can unplug ipod a few times, reconnect and iTunes still re