Posts

Showing posts with the label javac

Javac cannot find SWT library despite correct classpath

Javac cannot find SWT library despite correct classpath I have a Java project that uses SWT and compiles/runs perfectly. When I try to compile via Ant, however, javac cannot find the SWT library despite the build.xml specifying the correct classpath. The SWT library is located in C:my_workEclipse3.6-64plugins . As seen below (under the javac tags, this classpath is specified as such. C:my_workEclipse3.6-64plugins javac build.xml <?xml version="1.0" encoding="UTF-8"?> <project default="run" name="My Project"> <target name="run" depends="compile"> <java classname="com.company.program.project"> <classpath path="staging" location="C:my_workEclipse3.6-64plugins"/> </java> </target> <target name="compile"> <javac includeantruntime="false" srcdir="./src" destdir="staging"> <classpath...

javac : The term 'javac' is not recognized as the name of a cmdlet, function, script file or operable program [duplicate]

Image
javac : The term 'javac' is not recognized as the name of a cmdlet, function, script file or operable program [duplicate] This question already has an answer here: I installed Java's jdk1.8. When I use the java command it works fine. But if I use the javac command it doesn't find the path. The JDK is in the Environment Variables (check picture). I have restarted the command prompt and the computer, nothing works. help! This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. the JRE doesn't even contain javac.exe - what are you talking about? Also no need to be condescending, just trying to learn. – Dylan Cronkhite Jul 1 at 2:21 You are right. I have closed this as a duplicate of a Q&A that explains that...

Java program is compiling in netbeans but not in CMD, package does not exist

Java program is compiling in netbeans but not in CMD, package does not exist I'm working on a shop management System program. Building this using NetBeans, Java and SQL Server. I used a Jdatepicker in my Program. It is working well in NetBeans, but now I was trying to compile it through CMD. i'm using correct syntax, but yet it is giving me errors package org.jdesktop.swingx does not exist import org.jdesktop.swingx.JXDatePicker; with many similar errors about datepicker . I have already imported 4 libearies Jdatepicker package org.jdesktop.swingx does not exist import org.jdesktop.swingx.JXDatePicker; datepicker import javax.swing.JFormattedTextField.AbstractFormatter; import org.jdesktop.swingx.JXDatePicker; import org.jdesktop.swingx.plaf.basic.CalendarHeaderHandler; import org.jdesktop.swingx.plaf.basic.SpinningCalendarHeaderHandler; for this purpose, It is working well in NetBeans but not in cmd. I have used javac in cmd using -classpath file address.jar , but same erro...